From a2a8d3e8f449673aef6168146fbb8c09c471e46e Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 31 May 2011 09:32:00 -0400 Subject: [PATCH] docs: expand the docs for border-image https://bugzilla.gnome.org/show_bug.cgi?id=651194 --- gtk/gtkcssprovider.c | 50 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 2e50b0c715..42a25a96c9 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -527,21 +527,51 @@ * which is always rendered on top of the shadow layer. * * - * + * * Border images * - * Images can be used in 'slices' for the purpose of creating scalable - * borders. + * Images and gradients can also be used in slices for the purpose of creating + * scalable borders. + * For more information, see the CSS3 documentation for the border-image property, + * which can be found here. * * * - * The syntax for specifying border images of this kind is: - * url(@path) @top @right @bottom @left [repeat|stretch]? [repeat|stretch]? - * The sizes of the 'cut off' portions are specified - * with the @top, @right, @bottom and @left parameters. - * The 'middle' sections can be repeated or stretched to create - * the desired effect, by adding the 'repeat' or 'stretch' options after - * the dimensions. If two options are specified, the first one affects + * The parameters of the slicing process are controlled by + * three separate properties. Note that you can use the + * border-image shorthand property + * to set values for the three properties at the same time. + * + * + * border-image-source: url(@path) + * (or border-image-source: -gtk-gradient(...)): + * Specifies the source of the border image, and it can either + * be an URL or a gradient (see above). + * + * + * border-image-slice: @top @right @bottom @left + * The sizes specified by the @top, @right, @bottom and @left parameters + * are the offsets, in pixels, from the relevant edge where the image + * should be "cut off" to build the slices used for the rendering + * of the border. + * + * + * border-image-repeat: [stretch|repeat|round|space] ? + * [stretch|repeat|round|space] + * Specifies how the image slices should be rendered in the area + * outlined by border-width. + * The default (stretch) is to resize the slice to fill in the whole + * allocated area. + * If the value of this property is 'repeat', the image slice + * will be tiled to fill the area. + * If the value of this property is 'round', the image slice will + * be tiled to fill the area, and scaled to fit it exactly + * a whole number of times. + * If the value of this property is 'space', the image slice will + * be tiled to fill the area, and if it doesn't fit it exactly a whole + * number of times, the extra space is distributed as padding around + * the slices. + * If two options are specified, the first one affects * the horizontal behaviour and the second one the vertical behaviour. * If only one option is specified, it affects both. * -- 2.30.2